//
//  ImageDownloader.h
//  Radio Streaming
//
//  Created by Huu Nhat on 6/7/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

@class Restaurant;

@protocol ImageDownloaderDelegate;

@interface ImageDownloader : NSObject
{
    Restaurant *restaurant;
    NSIndexPath *indexPathInTableView;
    id <ImageDownloaderDelegate> delegate;
    
    NSMutableData *activeDownload;
    NSURLConnection *imageConnection;
}

@property (nonatomic, retain) Restaurant *restaurant;
@property (nonatomic, retain) NSIndexPath *indexPathInTableView;
@property (nonatomic, assign) id <ImageDownloaderDelegate> delegate;

@property (nonatomic, retain) NSMutableData *activeDownload;
@property (nonatomic, retain) NSURLConnection *imageConnection;

- (void)startDownload;
- (void)cancelDownload;

@end

@protocol ImageDownloaderDelegate 

- (void)appImageDidLoad:(NSIndexPath *)indexPath;

@end
